from selenium import webdriver

path='phantomjs.exe'
browser=webdriver.PhantomJS(executable_path=path)

url='https://www.baidu.com'
browser.get(url)

browser.save_screenshot('baidu.png')

import time
time.sleep(2)

input = browser.find_element_by_id('kw')
input.send_keys('周杰伦')
time.sleep(2)

browser.save_screenshot("周杰伦.png")
